home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Demos / Bowers Development / AppMaker 2.0b5 / Examples / ODF / AMSample / Sources / Content.h < prev    next >
Encoding:
Text File  |  1996-06-03  |  2.8 KB  |  92 lines  |  [TEXT/CWIE]

  1. //========================================================================================
  2. //
  3. //    File:                Content.h
  4. //    Release Version:    $ ODF 1 $
  5. //
  6. //    Copyright:            (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
  7. //
  8. //========================================================================================
  9.  
  10. #ifndef CONTENT_H
  11. #define CONTENT_H
  12.  
  13. #ifndef DEFINES_K
  14. #include "Defines.k"
  15. #endif
  16.  
  17. // ----- Framework Includes -----
  18.  
  19. #ifndef FWCONTNT_H
  20. #include "FWContnt.h"
  21. #endif
  22.  
  23. //========================================================================================
  24. //    Forward Declarations
  25. //========================================================================================
  26.  
  27. class CAMSamplePart;
  28.  
  29. //========================================================================================
  30. //    class CAMSampleContent
  31. //========================================================================================
  32.  
  33. class CAMSampleContent : public FW_CContent
  34. {
  35. //----------------------------------------------------------------------------------------
  36. //    Initialization/Destruction
  37. //
  38. public:
  39.     FW_DECLARE_AUTO(CAMSampleContent)
  40.  
  41.     CAMSampleContent(Environment* ev, CAMSamplePart* part);
  42.     virtual ~CAMSampleContent();
  43.  
  44. //----------------------------------------------------------------------------------------
  45. //    Inherited API
  46. //
  47. public:
  48.     virtual void        Externalize(Environment* ev,
  49.                                      ODStorageUnit* storageUnit,
  50.                                      FW_EStorageKinds storageKind,
  51.                                      FW_CCloneInfo* cloneInfo);
  52.     virtual FW_Boolean    Internalize(Environment* ev,
  53.                                      ODStorageUnit* storageUnit, 
  54.                                      FW_EStorageKinds storageKind,
  55.                                      FW_CCloneInfo* cloneInfo);
  56.  
  57. //----------------------------------------------------------------------------------------
  58. //    New API
  59. //
  60. public:
  61.     FW_Boolean            InternalizePartKind(Environment* ev, ODStorageUnit* sourceSU);
  62.     FW_Boolean             InternalizeText(Environment* ev, ODStorageUnit* sourceSU);
  63.  
  64.     void                ExternalizePartKind(Environment* ev, ODStorageUnit* destinationSU);
  65.     void                ExternalizeText(Environment* ev, ODStorageUnit* destinationSU);
  66.  
  67.     const FW_CString&    GetTextData();
  68.     void                SetTextData(Environment* ev, const FW_CString& newText);
  69.     void                ClearTextData(Environment* ev);
  70.  
  71.     FW_Boolean            IsTextCentered();
  72.     void                CenterText(Environment* ev, FW_Boolean state);
  73.  
  74. //----------------------------------------------------------------------------------------
  75. //    Data Members
  76. //
  77. protected:
  78.     FW_CString255        fTextData;            // part content
  79.     FW_Boolean            fCentered;            // part setting
  80.     CAMSamplePart*            fAMSamplePart;
  81. };
  82.  
  83. //========================================================================================
  84. // Inlines
  85. //========================================================================================
  86.  
  87. inline FW_Boolean CAMSampleContent::IsTextCentered()
  88. {
  89.     return fCentered;
  90. }
  91.  
  92. #endif